package com.jrx.anytxn.transaction.service;

import com.jrx.anytxn.customer.entity.TlMarketingRecord;
import com.jrx.anytxn.transaction.entity.TlDisbursementLog;
import com.jrx.anytxn.transaction.entity.TlPaymentLog;
import com.jrx.anytxn.transaction.entity.TlRefundLog;
import com.jrx.anytxn.transaction.entity.TlSmsLog;
import com.jrx.anytxn.transaction.pojo.DailyAccount;

import java.net.SocketException;

/**
 * @program: anytxn-cf-transaction
 * @description: 构建外部接口请求类接口
 * @author: xiaoyu.jing
 * @date: 2019-11-25 20:44
 **/
public interface IDealGatewayService {

    /**
     * 构建单笔代收请求
     * @param log
     * @return
     */
    String buildCollectReq(TlPaymentLog log) throws Exception;

    /**
     * 构建代收查询请求
     * @param log
     * @return
     */
    String buildQueryTansStatReq(TlPaymentLog log) throws Exception;

    /**
     * 构建单笔代付请求
     *
     * @param log 放款流水
     * @param thirdAcctNo 中间账户
     * @return
     */
    String buildPayReq(TlDisbursementLog log, String thirdAcctNo) throws Exception;

    /**
     * 构建代付查询请求
     * @param log
     * @return
     */
    String buildQueryTansStatReq(TlDisbursementLog log) throws Exception;

    /**
     * 构建短信发送请求
     * @return
     * @throws Exception
     */
    String buildSMSRequest(TlSmsLog tlSmsLog,String smsContent) throws Exception;

    /**
     * 构建查询本行卡月请求
     * @param log
     * @return
     * @throws Exception
     */
    String buildQuestAvailAmnt(TlPaymentLog log) throws Exception;

    /**
     * 构建营销信息推送请求
     *
     * @param record 营销信息
     * @return
     */
    String buildMarketSendReq(TlMarketingRecord record) throws Exception;

    /**
     * 构建营销信息推送结果查询请求
     *
     * @param record 营销信息
     * @return
     */
    String buildMarketCheckReq(TlMarketingRecord record) throws Exception;

    /**
     * 构建退款转账请求
     * @param log
     * @return
     */
    String buildRefundReq(TlRefundLog log) throws Exception;

    /**
     * 构建互转交易服务请求
     *
     * @param log
     * @return
     * @throws Exception
     */
    String buildInterestCompensateReq(TlPaymentLog log) throws Exception;

    /**
     * 本行卡放款交易
     * @param log
     * @return
     */
    String buildInnerDisbursementReq(TlDisbursementLog log) throws Exception;

    /**
     * 他行卡放款查询
     * @param log
     * @return
     */
    String buildOuterDisbursementReq(TlDisbursementLog log) throws Exception;

    /**
     * 构建日终T24核心汇总记账请求
     * @param record  待记账信息
     * @param creditMediumAcctCode 贷方介质账号码值
     * @param seqNo  记账请求流水号
     * @return
     * @throws Exception
     */
    String buildT24Req(DailyAccount record, String creditMediumAcctCode, String seqNo) throws Exception;

    /**
     * 构建查询本行卡余额查询请求
     * @param log
     * @return
     * @throws Exception
     */
    String buildQuestAvailBalance(TlPaymentLog log) throws Exception;
}
